package org.jeecg.modules.hc.service;

import com.github.binarywang.wxpay.exception.WxPayException;
import org.jeecg.modules.hc.entity.HcWxPayRefund;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

/**
 * @Description: 微信退款
 * @Author: jeecg-boot
 * @Date:   2023-01-09
 * @Version: V1.0
 */
public interface IHcWxPayRefundService extends IService<HcWxPayRefund> {

    /**
     * 退款
     * @param outTradeNo
     * @param userId
     * @param total
     * @param refund
     * @return
     * @throws WxPayException
     */
    HcWxPayRefund refund(String outTradeNo, String userId, Integer total, BigDecimal refund) throws WxPayException;

    /**
     * 查询退款
     * @param refundId
     * @return
     */
    HcWxPayRefund queryRefund(String refundId);
}
